<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        /* z-index 可设置定位元素的堆叠顺序 */
        .parent{
            width: 200px;
            height: 200px;
            background-color: crimson;
            position: relative;
        }
        .one{
            width: 100px;
            height: 150px;
            background-color: yellow;
            position: absolute;
            z-index: 2;
        }
        .two{
            width: 150px;
            height: 100px;
            background-color: violet;
            position: absolute;
            z-index: 1;
        }
    </style>
</head>
<body>
    <div class="parent">
        <div class="one">

        </div>
        <div class="two"></div>
    </div>
</body>
</html>